<?php	$atr=array(
					"name"=>"contract",
					"onsubmit"=>"return checkContract()"
				  ); 
	echo form_open('contract/insert',$atr);
	$bar=" Insert Contract "; 
	
	$dayNight=array(
		"Day"=>"Day",
		"Night"=>"Night",
		"Moon"=>"Moon"
	);
?> 

<table id="box-table-a" cellspacing="1" align="right" width="900px">
	<tr>
		<td colspan=5 align=right class=bar><?php echo $bar;?></td>
	</tr>
	<tr>
		<td>Contract_ID</td>
		<td><input type="text" name="Contract_ID" /> </td>
	</tr>
	<tr>
		<td>Staff_ID</td>
		<td><?php echo form_dropdown('Staff_ID', $staff );?></td>   
	</tr>
	<tr>
		<td>Location</td>
		<td><input type="text" name="Location" /> </td>
	</tr>
	<tr>
		<td>JoiningDate</td>
		<td><input type="text" name="JoiningDate" id="Date" onclick="loadCalendar(this.id);"/> </td>
	</tr>
	<tr>
		<td>Department_ID</td>
		<td><?php echo form_dropdown('Department_ID', $department);?></td>   
	</tr>
	<tr>
		<td>Section_ID</td>
		<td><?php echo form_dropdown('Session_ID', $section);?></td>   
	</tr>
	<tr>
		<td>Worklevel</td>
		<td><?php echo form_dropdown('WorkLevel', $workLevel);?> </td>
	</tr>
	<tr>
		<td>Position</td>
		<td><input type="text" name="Position" /> </td>
	</tr>
	<tr>
		<td>ContractType_ID</td>
		<td><?php echo form_dropdown('ContractType_ID', $contractType );?></td>   
	</tr>
	<tr>
		<td>EffectiveDate</td>
		<td><input type="text" name="EffectiveDate" id="Date0" onclick="loadCalendar(this.id);"/> </td>
	</tr>
	<tr>
		<td>ExpiredDate</td>
		<td><input type="text" name="ExpiredDate" id="Date1" onclick="loadCalendar(this.id);"/> </td>
	</tr>
	<tr>
		<td>Prodemotion</td>
		<td><input type="text" name="Proemotion" /> </td>
	</tr>	
	<tr>
		<td>SalaryScale</td>
		<td><input type="text" name="SalaryScale" /> </td>
	</tr>
	<tr>
		<td>ExitDate</td>
		<td><input type="text" name="ExitDate" id="Date2" onclick="loadCalendar(this.id);"/> </td>
	</tr>
	<tr>
		<td>ResignationDate</td>
		<td><input type="text" name="ResignationDate" id="Date3" onclick="loadCalendar(this.id);"/> </td>
	</tr>
	<tr>
		<td>DayNight</td>
		<td><?php echo form_dropdown('DayNight', $dayNight,'Day' );?></td>
	</tr>	
	<tr>
		<td align="center" colspan="2" id="abc"><?php if (isset($error)) echo $error;?></td>
	</tr>
	<tr>
		<td colspan="2" align="center"><input type="submit" value="insert"/></td>
	</tr>
</table>	




